﻿<sad:ActivityDesigner x:Class="Vision.Core.ActivityComponents.IO.Ftp.FtpMakeDirectoryDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities"
    xmlns:sad="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sadc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:sadv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    xmlns:converters="clr-namespace:Vision.Core.ActivityComponents.Converters"
    Collapsible="True" ExpandState="True">
    <sad:ActivityDesigner.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1">
            <sadc:ArgumentToExpressionConverter x:Uid="sadv:ArgumentToExpressionConverter_1" x:Key="argumentToExpressionConverter" />
            <converters:InArgumentBoolConverter x:Key="argumentBoolConverter" />
            <DataTemplate x:Uid="DataTemplate_1" x:Key="ExpandedActivityViewTemplate">
                <StackPanel x:Uid="StackPanel_1">
                    <Grid x:Uid="Grid_1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="90" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="24" />
                            <RowDefinition Height="24" />
                        </Grid.RowDefinitions>

                        <!-- Inputs Header -->
                        <TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Uid="Header_1" Text="Input(s):" FontWeight="Bold" Foreground="Navy" Margin="0,0,0,3" />

                        <!-- ModelItem.DirectoryName -->
                        <TextBlock Grid.Row="1" Grid.Column="0" x:Uid="TextBlock_1" Text="Directory name:" VerticalAlignment="Top" />
                        <sadv:ExpressionTextBox Grid.Row="1" Grid.Column="1" x:Uid="filePathBox" x:Name="filePathBox"
                            MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                            Expression="{Binding Path=ModelItem.DirectoryName, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                            ExpressionType="{x:Type s:String}"
                            OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />
                    </Grid>

                    <Grid Margin="0,5,0,0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="130" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <!-- ModelItem.WithIntegrityPacket -->
                        <TextBlock Grid.Row="1" Grid.Column="0" Text="Set as current directory:" VerticalAlignment="Top" />
                        <CheckBox Grid.Row="1" Grid.Column="1" Margin="7,0,0,0"  IsChecked="{Binding Path=ModelItem.SetAsCurrentDirectory, Mode=TwoWay, Converter={StaticResource argumentBoolConverter}}" />
                        <!--<sapv:ExpressionTextBox Grid.Row="1" Grid.Column="1"
                        MaxLines="1" Margin="7,0,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                        Expression="{Binding Path=ModelItem.WithIntegrityPacket, Mode=TwoWay, Converter={StaticResource argumentToExpressionConverter}, ConverterParameter=In}"
                        ExpressionType="{Binding Path=ModelItem.WithIntegrityPacket.ArgumentType}"
                        OwnerActivity="{Binding Path=ModelItem, Mode=OneWay}" />-->
                    </Grid>
                    
                    <Border BorderThickness="0,0,0,3" Margin="0,5">
                        <Border.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="DarkGray" Offset="0" />
                                <GradientStop Color="White" Offset="1" />
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                    </Border>
                    <sad:WorkflowItemPresenter x:Uid="sad:WorkflowItemPresenter_1" AutomationProperties.AutomationId="Activity" IsDefaultContainer="True"
                        HintText="Drop activity here"
                        Item="{Binding Path=ModelItem.Body, Mode=TwoWay}"
                        AllowedItemType="{x:Type sa:Activity}"
                        MinWidth="100"
                        MinHeight="50"
                    />
                </StackPanel>
            </DataTemplate>
            <DataTemplate x:Uid="DataTemplate_2" x:Key="CollapsedActivityViewTemplate">
                <Label x:Uid="TextBlock_6" Padding="0,0,0,0" FontStyle="Italic" Foreground="{x:Static SystemColors.GrayTextBrush}" HorizontalAlignment="Center" VerticalAlignment="Center">Double-click to view</Label>
            </DataTemplate>
            <Style x:Uid="Style_1" x:Key="FtpStyle" TargetType="{x:Type ContentPresenter}">
                <Setter x:Uid="Setter_1" Property="ContentTemplate" Value="{DynamicResource ExpandedActivityViewTemplate}" />
                <Style.Triggers>
                    <DataTrigger x:Uid="DataTrigger_1" Binding="{Binding Path=ShowExpanded}" Value="false">
                        <Setter x:Uid="Setter_2" Property="ContentTemplate" Value="{DynamicResource CollapsedActivityViewTemplate}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </sad:ActivityDesigner.Resources>
    <ContentPresenter x:Uid="ContentPresenter_1" Style="{DynamicResource FtpStyle}" Content="{Binding}" />
</sad:ActivityDesigner>
